Networks of computing devices are used in many applications. One such example is a wireless sensor network (WSN) that includes a large number of nodes that are in remote communication with a base station. These nodes communicate data with the base station, on a regular or irregular basis. In either case, the data can be communicated with deterministic or non-deterministic timing. In the event the network behaves in a manner that is unexpected, e.g., when a bug occurs, determining the source of the bug can be challenging due to, e.g., remoteness of deployed sensor nodes (e.g., inaccessibility), the non-deterministic nature of data or of a sequence of execution that can make it challenging to replicate the bug, or the limited hardware resources available on a node.
A mechanism for debugging such networks is known as “record and replay,” which logs a trace of predefined events while an application is executing such that the events can be replayed later using associated debugging tools. However, these debugging tools have various limitations. For example, existing recording methods for WSNs for several reasons cannot capture complete code execution associated with the nodes, thus resulting in the inability to effectively replay and thereby causing some bugs to go unnoticed. For example, prior deterministic record and replay methods cannot adequately trace non-deterministic events such as sensor values or message arrival times, and do not execute efficiently on limited-resource computing nodes.